/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.KeyNamePair;

/** Generated Model for M_InventoryEmployee
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_M_InventoryEmployee extends PO implements I_M_InventoryEmployee, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20130610L;

    /** the default Constructor */
    public X_M_InventoryEmployee(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_M_InventoryEmployee (Properties ctx, int M_InventoryEmployee_ID, String trxName)
    {
      super (ctx, M_InventoryEmployee_ID, trxName);
      /** if (M_InventoryEmployee_ID == 0)
        {
			setC_BPartner_ID (0);
			setM_Inventory_ID (0);
			setM_Inventory_MemberType (null);
			setM_InventoryEmployee_ID (0);
        } */
    }

    /** Load Constructor */
    public X_M_InventoryEmployee (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_M_InventoryEmployee[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getC_BPartner_ID(), get_TrxName());	}

	/** Set Employee.
		@param C_BPartner_ID 
		Identifies a Business Partner
	  */
	public void setC_BPartner_ID (int C_BPartner_ID)
	{
		if (C_BPartner_ID < 1) 
			set_Value (COLUMNNAME_C_BPartner_ID, null);
		else 
			set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
	}

	/** Get Employee.
		@return Identifies a Business Partner
	  */
	public int getC_BPartner_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Payroll Job.
		@param HR_Job_ID Payroll Job	  */
	public void setHR_Job_ID (String HR_Job_ID)
	{
		throw new IllegalArgumentException ("HR_Job_ID is virtual column");	}

	/** Get Payroll Job.
		@return Payroll Job	  */
	public String getHR_Job_ID () 
	{
		return (String)get_Value(COLUMNNAME_HR_Job_ID);
	}

	public org.compiere.model.I_M_Inventory getM_Inventory() throws RuntimeException
    {
		return (org.compiere.model.I_M_Inventory)MTable.get(getCtx(), org.compiere.model.I_M_Inventory.Table_Name)
			.getPO(getM_Inventory_ID(), get_TrxName());	}

	/** Set Phys.Inventory.
		@param M_Inventory_ID 
		Parameters for a Physical Inventory
	  */
	public void setM_Inventory_ID (int M_Inventory_ID)
	{
		if (M_Inventory_ID < 1) 
			set_Value (COLUMNNAME_M_Inventory_ID, null);
		else 
			set_Value (COLUMNNAME_M_Inventory_ID, Integer.valueOf(M_Inventory_ID));
	}

	/** Get Phys.Inventory.
		@return Parameters for a Physical Inventory
	  */
	public int getM_Inventory_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_M_Inventory_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

    /** Get Record ID/ColumnName
        @return ID/ColumnName pair
      */
    public KeyNamePair getKeyNamePair() 
    {
        return new KeyNamePair(get_ID(), String.valueOf(getM_Inventory_ID()));
    }

	/** M_Inventory_MemberType AD_Reference_ID=1000140 */
	public static final int M_INVENTORY_MEMBERTYPE_AD_Reference_ID=1000140;
	/** Chairman of commission = CC */
	public static final String M_INVENTORY_MEMBERTYPE_ChairmanOfCommission = "CC";
	/** Member of the commission = MC */
	public static final String M_INVENTORY_MEMBERTYPE_MemberOfTheCommission = "MC";
	/** Financially liable employee = FE */
	public static final String M_INVENTORY_MEMBERTYPE_FinanciallyLiableEmployee = "FE";
	/** Inventory checker = IC */
	public static final String M_INVENTORY_MEMBERTYPE_InventoryChecker = "IC";
	/** Set Type member of inventory.
		@param M_Inventory_MemberType Type member of inventory	  */
	public void setM_Inventory_MemberType (String M_Inventory_MemberType)
	{

		set_Value (COLUMNNAME_M_Inventory_MemberType, M_Inventory_MemberType);
	}

	/** Get Type member of inventory.
		@return Type member of inventory	  */
	public String getM_Inventory_MemberType () 
	{
		return (String)get_Value(COLUMNNAME_M_Inventory_MemberType);
	}

	/** Set Employee inventory ID.
		@param M_InventoryEmployee_ID Employee inventory ID	  */
	public void setM_InventoryEmployee_ID (int M_InventoryEmployee_ID)
	{
		if (M_InventoryEmployee_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_M_InventoryEmployee_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_M_InventoryEmployee_ID, Integer.valueOf(M_InventoryEmployee_ID));
	}

	/** Get Employee inventory ID.
		@return Employee inventory ID	  */
	public int getM_InventoryEmployee_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_M_InventoryEmployee_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}
}